/***********************************************
 This file is part of redia-bapps-main-ios.
 
 Copyright (c) 2015 Redia A/S
 
 Redia-bapps-main-ios is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation, either version 3 of the License, or
 (at your option) any later version.
 
 redia-bapps-main-ios is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with redia-bapps-main-ios.  If not, see <http://www.gnu.org/licenses/>.
 
 *********************************************** */

//
//  BALocations.h
//  redia-bapps-ios
//
//  Created by Brian Vestergaard Danielsen on 12/03/14.
//  Copyright (c) 2014 Redia A/S. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "BAMaterialLocation.h"
#import "BABranch.h"

@interface BAMaterialLocations : NSObject<JSONEncoding>

@property(nonatomic, strong) NSArray* locations;              ///< Array of BAMaterialLocation
@property(nonatomic, strong) NSArray* subLocations;           ///< Array of BAMaterialLocation
@property(nonatomic, strong) NSArray* departments;            ///< Array of BAMaterialLocation
@property(nonatomic, strong) NSArray* collections;            ///< Array of BAMaterialLocation
@property(nonatomic, strong) NSArray* reservationBranches;    ///< Array of BABranch
@property(nonatomic, strong) NSArray* branches;               ///< Array of BABranch


/**
 Utility classes (not mapped to backend)
 for looking up from location/branch code to BAMaterialLocation/BABranch object
 */
@property(nonatomic, readonly) NSDictionary* locationsDict;             ///< Dictionary from NSString (with location code) to BAMaterialLocation
@property(nonatomic, readonly) NSDictionary* subLocationsDict;          ///< Dictionary from NSString (with location code) to BAMaterialLocation
@property(nonatomic, readonly) NSDictionary* departmentsDict;           ///< Dictionary from NSString (with location code) to BAMaterialLocation
@property(nonatomic, readonly) NSDictionary* collectionsDict;           ///< Dictionary from NSString (with location code) to BAMaterialLocation
@property(nonatomic, readonly) NSDictionary* reservationBranchesDict;   ///< Dictionary from NSString (with branch code) to BABranch
@property(nonatomic, readonly) NSDictionary* branchesDict;              ///< Dictionary from NSString (with branch code) to BABranch

@end
